# -*- coding: utf-8 -*-
# @Time: 2025/4/22 13:56
# @Author: foxhuty
# @File: pytorch_notes_1.py


import torch
from sklearn.metrics import roc_auc_score, accuracy_score, precision_score, recall_score, f1_score
import numpy as np
# 示例数据
y_true = np.array([1, 0, 1, 1, 0, 1, 0, 1, 0, 1])
y_scores = np.array([0.9, 0.2, 0.8, 0.7, 0.3, 0.6, 0.4, 0.9, 0.1, 0.5])
# 计算AUC
auc = roc_auc_score(y_true, y_scores)
print("AUC:", auc)

print(torch.__version__)
print(torch.version.cuda)

x = torch.empty(5, 3)
print(x)
x = torch.rand(5, 3)
print(x)
print(x.type())
x = torch.zeros(5, 3, dtype=torch.long)
print(x)
